﻿namespace Crowler.Model.CoreComponents
{
    public interface IBusinessService<in TRequest , out TResponse> 
    {
        TRequest ServiceRequest { set; }
        TResponse ServiceResponse { get; }
        void InitializeDefaultResponse();
        void Execute();
        
    }
    public interface IBusinessServiceResponse
    {
        void Initialize();
    }
    public abstract class BusinessServiceBase<TRequest, TResponse> : IBusinessService<TRequest, TResponse>
        where TRequest : class
        where TResponse : class
    {
        protected TRequest Request;
        public virtual TRequest ServiceRequest
        {
            set { Request = value; }
        }

        protected TResponse Response;
        public virtual TResponse ServiceResponse
        {
            get { return Response; }
        }

        public abstract void Execute();

        public abstract void InitializeDefaultResponse();
    }
}
